package Chapter22.CollectionsMethod;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class listToSet {
    public static void main(String[] args) {

        Collection<String> list = Arrays.asList("red", "green", "blue", "blue");
        Set<String> set = new HashSet<>(list);
        System.out.println(list);
        System.out.println(set);


    }
}
